#include <iostream>
#include <string>
using namespace std;

int main() {
    string id;
    cout << "请输入18位身份证号码：";
    cin >> id;
    if (id.length() == 18) {
        int genderDigit = id[16] - '0';
        if (genderDigit % 2 == 0) {
            cout << "女性" << endl;
        } else {
            cout << "男性" << endl;
        }
    } else {
        cout << "输入的身份证号码无效。" << endl;
    }
    return 0;
}